<%@page contentType="text/html;charset=UTF-8"%>
<% request.setCharacterEncoding("UTF-8"); %>
<HTML>
<HEAD>
<TITLE>Result</TITLE>
</HEAD>
<BODY>
<H1>Result</H1>

<jsp:useBean id="sampleGameProxyid" scope="session" class="castlewarserver.GameProxy" />
<%
if (request.getParameter("endpoint") != null && request.getParameter("endpoint").length() > 0)
sampleGameProxyid.setEndpoint(request.getParameter("endpoint"));
%>

<%
String method = request.getParameter("method");
int methodID = 0;
if (method == null) methodID = -1;

if(methodID != -1) methodID = Integer.parseInt(method);
boolean gotMethod = false;

try {
switch (methodID){ 
case 2:
        gotMethod = true;
        java.lang.String getEndpoint2mtemp = sampleGameProxyid.getEndpoint();
if(getEndpoint2mtemp == null){
%>
<%=getEndpoint2mtemp %>
<%
}else{
        String tempResultreturnp3 = org.eclipse.jst.ws.util.JspUtils.markup(String.valueOf(getEndpoint2mtemp));
        %>
        <%= tempResultreturnp3 %>
        <%
}
break;
case 5:
        gotMethod = true;
        String endpoint_0id=  request.getParameter("endpoint8");
            java.lang.String endpoint_0idTemp = null;
        if(!endpoint_0id.equals("")){
         endpoint_0idTemp  = endpoint_0id;
        }
        sampleGameProxyid.setEndpoint(endpoint_0idTemp);
break;
case 10:
        gotMethod = true;
        castlewarserver.Game getGame10mtemp = sampleGameProxyid.getGame();
if(getGame10mtemp == null){
%>
<%=getGame10mtemp %>
<%
}else{
%>
<TABLE>
<TR>
<TD COLSPAN="3" ALIGN="LEFT">returnp:</TD>
</TABLE>
<%
}
break;
case 41:
        gotMethod = true;
        java.lang.String info41mtemp = sampleGameProxyid.info();
if(info41mtemp == null){
%>
<%=info41mtemp %>
<%
}else{
        String tempResultreturnp42 = org.eclipse.jst.ws.util.JspUtils.markup(String.valueOf(info41mtemp));
        %>
        <%= tempResultreturnp42 %>
        <%
}
break;
case 44:
        gotMethod = true;
        String player_1id=  request.getParameter("player47");
            java.lang.String player_1idTemp = null;
        if(!player_1id.equals("")){
         player_1idTemp  = player_1id;
        }
        java.lang.String newGame44mtemp = sampleGameProxyid.newGame(player_1idTemp);
if(newGame44mtemp == null){
%>
<%=newGame44mtemp %>
<%
}else{
        String tempResultreturnp45 = org.eclipse.jst.ws.util.JspUtils.markup(String.valueOf(newGame44mtemp));
        %>
        <%= tempResultreturnp45 %>
        <%
}
break;
case 49:
        gotMethod = true;
        sampleGameProxyid.resetGame();
break;
case 52:
        gotMethod = true;
        String index_2id=  request.getParameter("index63");
        int index_2idTemp  = Integer.parseInt(index_2id);
        gameObjects.Unit getUnitAt52mtemp = sampleGameProxyid.getUnitAt(index_2idTemp);
if(getUnitAt52mtemp == null){
%>
<%=getUnitAt52mtemp %>
<%
}else{
%>
<TABLE>
<TR>
<TD COLSPAN="3" ALIGN="LEFT">returnp:</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">gold:</TD>
<TD>
<%
if(getUnitAt52mtemp != null){
%>
<%=getUnitAt52mtemp.getGold()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">range:</TD>
<TD>
<%
if(getUnitAt52mtemp != null){
%>
<%=getUnitAt52mtemp.getRange()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">damage:</TD>
<TD>
<%
if(getUnitAt52mtemp != null){
%>
<%=getUnitAt52mtemp.getDamage()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">hp:</TD>
<TD>
<%
if(getUnitAt52mtemp != null){
%>
<%=getUnitAt52mtemp.getHp()
%><%}%>
</TD>
</TABLE>
<%
}
break;
case 65:
        gotMethod = true;
        gameObjects.Unit[] getAllUnits65mtemp = sampleGameProxyid.getAllUnits();
if(getAllUnits65mtemp == null){
%>
<%=getAllUnits65mtemp %>
<%
}else{
        String tempreturnp66 = null;
        if(getAllUnits65mtemp != null){
        java.util.List listreturnp66= java.util.Arrays.asList(getAllUnits65mtemp);
        tempreturnp66 = listreturnp66.toString();
        }
        %>
        <%=tempreturnp66%>
        <%
}
break;
case 68:
        gotMethod = true;
        String gold_4id=  request.getParameter("gold81");
        int gold_4idTemp  = Integer.parseInt(gold_4id);
        String range_5id=  request.getParameter("range83");
        int range_5idTemp  = Integer.parseInt(range_5id);
        String damage_6id=  request.getParameter("damage85");
        int damage_6idTemp  = Integer.parseInt(damage_6id);
        String hp_7id=  request.getParameter("hp87");
        int hp_7idTemp  = Integer.parseInt(hp_7id);
        %>
        <jsp:useBean id="gameObjects1Unit_3id" scope="session" class="gameObjects.Unit" />
        <%
        gameObjects1Unit_3id.setGold(gold_4idTemp);
        gameObjects1Unit_3id.setRange(range_5idTemp);
        gameObjects1Unit_3id.setDamage(damage_6idTemp);
        gameObjects1Unit_3id.setHp(hp_7idTemp);
        String x_8id=  request.getParameter("x89");
        int x_8idTemp  = Integer.parseInt(x_8id);
        String y_9id=  request.getParameter("y91");
        int y_9idTemp  = Integer.parseInt(y_9id);
        gameObjects.Unit moveUnit68mtemp = sampleGameProxyid.moveUnit(gameObjects1Unit_3id,x_8idTemp,y_9idTemp);
if(moveUnit68mtemp == null){
%>
<%=moveUnit68mtemp %>
<%
}else{
%>
<TABLE>
<TR>
<TD COLSPAN="3" ALIGN="LEFT">returnp:</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">gold:</TD>
<TD>
<%
if(moveUnit68mtemp != null){
%>
<%=moveUnit68mtemp.getGold()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">range:</TD>
<TD>
<%
if(moveUnit68mtemp != null){
%>
<%=moveUnit68mtemp.getRange()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">damage:</TD>
<TD>
<%
if(moveUnit68mtemp != null){
%>
<%=moveUnit68mtemp.getDamage()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">hp:</TD>
<TD>
<%
if(moveUnit68mtemp != null){
%>
<%=moveUnit68mtemp.getHp()
%><%}%>
</TD>
</TABLE>
<%
}
break;
case 93:
        gotMethod = true;
        String gold_11id=  request.getParameter("gold98");
        int gold_11idTemp  = Integer.parseInt(gold_11id);
        String range_12id=  request.getParameter("range100");
        int range_12idTemp  = Integer.parseInt(range_12id);
        String damage_13id=  request.getParameter("damage102");
        int damage_13idTemp  = Integer.parseInt(damage_13id);
        String hp_14id=  request.getParameter("hp104");
        int hp_14idTemp  = Integer.parseInt(hp_14id);
        %>
        <jsp:useBean id="gameObjects1Unit_10id" scope="session" class="gameObjects.Unit" />
        <%
        gameObjects1Unit_10id.setGold(gold_11idTemp);
        gameObjects1Unit_10id.setRange(range_12idTemp);
        gameObjects1Unit_10id.setDamage(damage_13idTemp);
        gameObjects1Unit_10id.setHp(hp_14idTemp);
        String gold_16id=  request.getParameter("gold108");
        int gold_16idTemp  = Integer.parseInt(gold_16id);
        String range_17id=  request.getParameter("range110");
        int range_17idTemp  = Integer.parseInt(range_17id);
        String damage_18id=  request.getParameter("damage112");
        int damage_18idTemp  = Integer.parseInt(damage_18id);
        String hp_19id=  request.getParameter("hp114");
        int hp_19idTemp  = Integer.parseInt(hp_19id);
        %>
        <jsp:useBean id="gameObjects1Unit_15id" scope="session" class="gameObjects.Unit" />
        <%
        gameObjects1Unit_15id.setGold(gold_16idTemp);
        gameObjects1Unit_15id.setRange(range_17idTemp);
        gameObjects1Unit_15id.setDamage(damage_18idTemp);
        gameObjects1Unit_15id.setHp(hp_19idTemp);
        gameObjects.Unit[] attackUnit93mtemp = sampleGameProxyid.attackUnit(gameObjects1Unit_10id,gameObjects1Unit_15id);
if(attackUnit93mtemp == null){
%>
<%=attackUnit93mtemp %>
<%
}else{
        String tempreturnp94 = null;
        if(attackUnit93mtemp != null){
        java.util.List listreturnp94= java.util.Arrays.asList(attackUnit93mtemp);
        tempreturnp94 = listreturnp94.toString();
        }
        %>
        <%=tempreturnp94%>
        <%
}
break;
case 116:
        gotMethod = true;
        String gold_21id=  request.getParameter("gold129");
        int gold_21idTemp  = Integer.parseInt(gold_21id);
        String range_22id=  request.getParameter("range131");
        int range_22idTemp  = Integer.parseInt(range_22id);
        String damage_23id=  request.getParameter("damage133");
        int damage_23idTemp  = Integer.parseInt(damage_23id);
        String hp_24id=  request.getParameter("hp135");
        int hp_24idTemp  = Integer.parseInt(hp_24id);
        %>
        <jsp:useBean id="gameObjects1Unit_20id" scope="session" class="gameObjects.Unit" />
        <%
        gameObjects1Unit_20id.setGold(gold_21idTemp);
        gameObjects1Unit_20id.setRange(range_22idTemp);
        gameObjects1Unit_20id.setDamage(damage_23idTemp);
        gameObjects1Unit_20id.setHp(hp_24idTemp);
        gameObjects.Unit attackCastle116mtemp = sampleGameProxyid.attackCastle(gameObjects1Unit_20id);
if(attackCastle116mtemp == null){
%>
<%=attackCastle116mtemp %>
<%
}else{
%>
<TABLE>
<TR>
<TD COLSPAN="3" ALIGN="LEFT">returnp:</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">gold:</TD>
<TD>
<%
if(attackCastle116mtemp != null){
%>
<%=attackCastle116mtemp.getGold()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">range:</TD>
<TD>
<%
if(attackCastle116mtemp != null){
%>
<%=attackCastle116mtemp.getRange()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">damage:</TD>
<TD>
<%
if(attackCastle116mtemp != null){
%>
<%=attackCastle116mtemp.getDamage()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">hp:</TD>
<TD>
<%
if(attackCastle116mtemp != null){
%>
<%=attackCastle116mtemp.getHp()
%><%}%>
</TD>
</TABLE>
<%
}
break;
case 137:
        gotMethod = true;
        String unitType_25id=  request.getParameter("unitType148");
            java.lang.String unitType_25idTemp = null;
        if(!unitType_25id.equals("")){
         unitType_25idTemp  = unitType_25id;
        }
        String player_26id=  request.getParameter("player150");
            java.lang.String player_26idTemp = null;
        if(!player_26id.equals("")){
         player_26idTemp  = player_26id;
        }
        gameObjects.Unit buyUnit137mtemp = sampleGameProxyid.buyUnit(unitType_25idTemp,player_26idTemp);
if(buyUnit137mtemp == null){
%>
<%=buyUnit137mtemp %>
<%
}else{
%>
<TABLE>
<TR>
<TD COLSPAN="3" ALIGN="LEFT">returnp:</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">gold:</TD>
<TD>
<%
if(buyUnit137mtemp != null){
%>
<%=buyUnit137mtemp.getGold()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">range:</TD>
<TD>
<%
if(buyUnit137mtemp != null){
%>
<%=buyUnit137mtemp.getRange()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">damage:</TD>
<TD>
<%
if(buyUnit137mtemp != null){
%>
<%=buyUnit137mtemp.getDamage()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">hp:</TD>
<TD>
<%
if(buyUnit137mtemp != null){
%>
<%=buyUnit137mtemp.getHp()
%><%}%>
</TD>
</TABLE>
<%
}
break;
case 152:
        gotMethod = true;
        String player_27id=  request.getParameter("player155");
            java.lang.String player_27idTemp = null;
        if(!player_27id.equals("")){
         player_27idTemp  = player_27id;
        }
        sampleGameProxyid.endTurn(player_27idTemp);
break;
case 157:
        gotMethod = true;
        String player_28id=  request.getParameter("player160");
            java.lang.String player_28idTemp = null;
        if(!player_28id.equals("")){
         player_28idTemp  = player_28id;
        }
        boolean isPlayerTaken157mtemp = sampleGameProxyid.isPlayerTaken(player_28idTemp);
        String tempResultreturnp158 = org.eclipse.jst.ws.util.JspUtils.markup(String.valueOf(isPlayerTaken157mtemp));
        %>
        <%= tempResultreturnp158 %>
        <%
break;
case 162:
        gotMethod = true;
        java.lang.String getActualPlayer162mtemp = sampleGameProxyid.getActualPlayer();
if(getActualPlayer162mtemp == null){
%>
<%=getActualPlayer162mtemp %>
<%
}else{
        String tempResultreturnp163 = org.eclipse.jst.ws.util.JspUtils.markup(String.valueOf(getActualPlayer162mtemp));
        %>
        <%= tempResultreturnp163 %>
        <%
}
break;
case 165:
        gotMethod = true;
        gameObjects.Castle getCastleOrange165mtemp = sampleGameProxyid.getCastleOrange();
if(getCastleOrange165mtemp == null){
%>
<%=getCastleOrange165mtemp %>
<%
}else{
%>
<TABLE>
<TR>
<TD COLSPAN="3" ALIGN="LEFT">returnp:</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">gold:</TD>
<TD>
<%
if(getCastleOrange165mtemp != null){
%>
<%=getCastleOrange165mtemp.getGold()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">cavalryPrice:</TD>
<TD>
<%
if(getCastleOrange165mtemp != null){
%>
<%=getCastleOrange165mtemp.getCavalryPrice()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">infantryPrice:</TD>
<TD>
<%
if(getCastleOrange165mtemp != null){
%>
<%=getCastleOrange165mtemp.getInfantryPrice()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">hp:</TD>
<TD>
<%
if(getCastleOrange165mtemp != null){
%>
<%=getCastleOrange165mtemp.getHp()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">pikemanPrice:</TD>
<TD>
<%
if(getCastleOrange165mtemp != null){
%>
<%=getCastleOrange165mtemp.getPikemanPrice()
%><%}%>
</TD>
</TABLE>
<%
}
break;
case 178:
        gotMethod = true;
        gameObjects.Castle getCastleBlue178mtemp = sampleGameProxyid.getCastleBlue();
if(getCastleBlue178mtemp == null){
%>
<%=getCastleBlue178mtemp %>
<%
}else{
%>
<TABLE>
<TR>
<TD COLSPAN="3" ALIGN="LEFT">returnp:</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">gold:</TD>
<TD>
<%
if(getCastleBlue178mtemp != null){
%>
<%=getCastleBlue178mtemp.getGold()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">cavalryPrice:</TD>
<TD>
<%
if(getCastleBlue178mtemp != null){
%>
<%=getCastleBlue178mtemp.getCavalryPrice()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">infantryPrice:</TD>
<TD>
<%
if(getCastleBlue178mtemp != null){
%>
<%=getCastleBlue178mtemp.getInfantryPrice()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">hp:</TD>
<TD>
<%
if(getCastleBlue178mtemp != null){
%>
<%=getCastleBlue178mtemp.getHp()
%><%}%>
</TD>
<TR>
<TD WIDTH="5%"></TD>
<TD COLSPAN="2" ALIGN="LEFT">pikemanPrice:</TD>
<TD>
<%
if(getCastleBlue178mtemp != null){
%>
<%=getCastleBlue178mtemp.getPikemanPrice()
%><%}%>
</TD>
</TABLE>
<%
}
break;
case 191:
        gotMethod = true;
        String player_29id=  request.getParameter("player194");
            java.lang.String player_29idTemp = null;
        if(!player_29id.equals("")){
         player_29idTemp  = player_29id;
        }
        String index_30id=  request.getParameter("index196");
        int index_30idTemp  = Integer.parseInt(index_30id);
        upgrades.Upgrade[] buyUpgrade191mtemp = sampleGameProxyid.buyUpgrade(player_29idTemp,index_30idTemp);
if(buyUpgrade191mtemp == null){
%>
<%=buyUpgrade191mtemp %>
<%
}else{
        String tempreturnp192 = null;
        if(buyUpgrade191mtemp != null){
        java.util.List listreturnp192= java.util.Arrays.asList(buyUpgrade191mtemp);
        tempreturnp192 = listreturnp192.toString();
        }
        %>
        <%=tempreturnp192%>
        <%
}
break;
case 198:
        gotMethod = true;
        String player_31id=  request.getParameter("player201");
            java.lang.String player_31idTemp = null;
        if(!player_31id.equals("")){
         player_31idTemp  = player_31id;
        }
        upgrades.Upgrade[] getUpgrades198mtemp = sampleGameProxyid.getUpgrades(player_31idTemp);
if(getUpgrades198mtemp == null){
%>
<%=getUpgrades198mtemp %>
<%
}else{
        String tempreturnp199 = null;
        if(getUpgrades198mtemp != null){
        java.util.List listreturnp199= java.util.Arrays.asList(getUpgrades198mtemp);
        tempreturnp199 = listreturnp199.toString();
        }
        %>
        <%=tempreturnp199%>
        <%
}
break;
}
} catch (Exception e) { 
%>
Exception: <%= org.eclipse.jst.ws.util.JspUtils.markup(e.toString()) %>
Message: <%= org.eclipse.jst.ws.util.JspUtils.markup(e.getMessage()) %>
<%
return;
}
if(!gotMethod){
%>
result: N/A
<%
}
%>
</BODY>
</HTML>